﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Utilities;

namespace Home.WebUI.Areas.NewAdmin.Models
{
    public class AdminLogin : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (Common.Current.Session["usermythi"] == null)
            {
                //ContentResult Message = new ContentResult();
                //Message.Content = " <script type=\"text/javascript\" language=\"javascript\">window.top.location.href=\"/Home/Default\";</script> ";
                RedirectResult url = new RedirectResult("/Home/Login");
                filterContext.Result = url;
            }
        }
    }
}